//
//  UtilsMacros.h
//  智能备考学习
//
//  Created by 盛超 on 2018/1/8.
//  Copyright © 2018年 盛超. All rights reserved.
//

#ifndef UtilsMacros_h
#define UtilsMacros_h

//信息配置类
#define LS_System [LSSystemConfig config]

//弱引用化
#define WeakObj(o)  __weak typeof(o) o##Weak = o

//登录类
#define DR_UserInfo  ([[LGUserInfoModel alloc] init])

//发送通知
#define KPostNotification(name,obj) [[NSNotificationCenter defaultCenter] postNotificationName:name object:obj]

//本地存储
#define KUserDefaults(obj,key) [[NSUserDefaults standardUserDefaults] setObject:obj forKey:key]

//取出本地存储信息
#define KGetUserDefaults(key)  [[NSUserDefaults standardUserDefaults] objectForKey:key]


//一些常用值
#define kNavgationBar     (isPhoneX?88:64)
#define kBottomPadding    (isPhoneX?34:0)

#define isPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
#define kTabBar 49
#define kWidth      [UIScreen mainScreen].bounds.size.width
#define kHeight     [UIScreen mainScreen].bounds.size.height
#define ScalesH     ([UIScreen mainScreen].bounds.size.height)/667.0f //与iphone6比较的缩放比例
#define ScalesW     ([UIScreen mainScreen].bounds.size.width)/375.0f
#define iPhone4     ([UIScreen mainScreen].bounds.size.height==480.0f)
#define iPhone5S    ([UIScreen mainScreen].bounds.size.height==568.0f)
#define iPhone6     ([UIScreen mainScreen].bounds.size.height==667.0f)
#define iPhone6P    ([UIScreen mainScreen].bounds.size.height==736.0f)
#define iPadMini    ([UIScreen mainScreen].bounds.size.height==512.0f)
#define iPad        ([UIScreen mainScreen].bounds.size.height==1024.0f)
#define RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a];
#define NotNull(a)  a?a:@""

//用于通知
#define listenPause @"listenPause"
#define videoPause @"videoPause"
#define listenTimeInvalidate @"listenTimeInvalidate"

//用于存储
/*用于判断登录状态*/
#define BKIsLogin @"BKIsLogin"
#define LG_Old_ServerUrl @"LG_Old_ServerUrl"
#define LG_Old_UserID @"LG_Old_UserID"
/*系统IP*/
#define SystemIP @"SystemIP"
/*图片地址IP*/
#define ImgIP @"ImgIP"
/*当前版本*/
#define VERSION_INFO_CURRENT @"CurrentVersion"

//第三方配置
/*腾讯Bugly*/
#define BUGLYAPPID @"9df220715d"

/*FTP相关*/
//#define ServerAddressFtp KGetUserDefaults(@"FtpServerAddress")
//#define UserFtp KGetUserDefaults(@"FTPUser")
//#define UserPwdFtp KGetUserDefaults(@"FtpUserPwd")
//#define UrlFtp KGetUserDefaults(@"FtpUrl")
#define downloadFilePath @"/Documents/DownloadFile"
#define zipFilePath @"/Documents/ZIP"
#define unzipFilePath @"/Documents/UNZIP"




#endif

/* UtilsMacros_h */
